Automated Presentation of directory src/apps/opaste/

HUB | Up | Download | Pheedbak | Tree | Topic | A-Z | Search | Hot | New


Please be aware: what appears below are the v4.2 DT bits in auto-generated html form.
As we have the time, we will update these to reflect the current "state of the world".


README file from "opaste" directory

 --------------------------------------------------------------------------
|   opaste - A tool for pasting images into the overlay/popup planes       |
 --------------------------------------------------------------------------

opaste is a useful tool for putting titles, credits, or annotation over an
existing application or image without needing to make any modifications to 
that program or image file.  Generally the procedure to do this would be to
invoke opaste with the name of the image you wish to paste. Position the
window where you would like it to appear by moving it the same way you would
any other window.  Then start the other application.  Since the opaste image
lives in the overlay graphics bitplanes.  It should still be visible no matter
how many other windows are opened underneath it.

To kill the program, press the right mouse button in the opaste window to get a
popup menu, then select "Quit".  Alternatively, press the "Esc" or "q" key in
the opaste window, or select "Close" or "Quit" from the window frame menu.

If you wish to hide the underlying window and frame, and pushing it to the
back of the window stack using the "Lower" window menu selection does not
completely hide it behind other windows, select "Detach Frame" from the opaste
popup menu.  The window can now be moved, resized, and even stowed and the
image will stay in the same place.  To move the image again, select
"Attach Frame" from the opaste popup menu, and the image will move with the
window.

Windows can be pushed, popped, and moved to get access the the opaste window
frame so the opaste image can be repositioned.  Remember your helpful X-
Windows shortcuts for this: Alt-F1 in a window to Pop it to the front, Alt-F3
to Push it to the back, Alt-F7 to move it, and Alt-F9 to iconify it.

Sometimes it is difficult to get access to the opaste window to move an image
once another application it started.  Selecting "Auto Pop" from the opaste
popup menu makes opaste pop its window to the front of the stack every 5
seconds or so.  Select "Don't Auto Pop" to stop it and let you push the window
out of view.

Sometimes applications (for example, "flight") make use of or reconfigure
the overlay planes.  Also some systems, like Indigo Starter, do not have
any overlay planes.  In this case, selecting "Use Popup" from the opaste
popup menu may work to display the image.  Popup planes are more subject to
destruction or modification by other applications, but using them may work
better than using the overlay planes.  Go back to using overlay planes by
selecting "Use Overlay" from the opaste popup menu.

opaste expects a very particular type of image file, since it assumes only
2 bitplanes (or 4 colors) to do its work.  The first color is clear, allowing
the normal graphics planes to show through.  opaste uses black, gray, and
white for the other three colors.  Given a normal sgi format .bw or .rgb image
file, opaste will quantize the first channel into four levels to display it.
To exactly specify the pixel values, create a one-channel image with pixel
values from  to 3, and set its type to SCREEN (use "iset SCREEN filename").

This is not a perfect solution to the problem.  opaste has to trick the window
system into letting it draw wherever it wants.  Also, other applications may
overwrite or reconfigure the overlay or popup planes, or change the colors
that are used.  opaste tries to lessen these problems by rewriting the image
every 5 seconds or so, but this approach may also break other applications'
graphics.  There can be situations where opaste just can't give an acceptible
result.


 --------------------------------------------------------------------------
|   Creating opaste'able images.                                           |
 --------------------------------------------------------------------------

Two programs are provided to help make the special opaste color index images:
ditgray and ditshadow.

ditgray takes a grayscale or RGB image and dithers it into the three opaque
colors used by opaste - black, gray, and white (indices 1, 2, and 3).

ditshadow takes a grayscale or RGB image and dithers it so that dark areas are
opaque black (index 1) and white areas are transparent (index 0).  This is
useful for creating dropshadows which partially obscure whatever lies below
them on the screen.

Use the "mult" command to set clear pixels in a ditgray image.  For example,
if blah.bw is a white over black image (1 channel, values  and 255), to create
an opaste'able white over clear image, enter:
    ditgray blah.bw white_over_black.sc
    mult blah.bw white_over_black.sc white_over_clear.sc
    iset SCREEN white_over_clear.sc

Use the "add" command to combine elements.  For example, if blah_ds.bw is a
black over white drop shadow corresponding to blah.bw (offset down and to one
side), to add the dropshadow to white_over_clear.sc, enter:
    ditshadow blah_ds.bw dropshadow.sc
    # These two lines create and apply a holdout mask for the part of the
    # dropshadow covered by the top image, blah.bw:
    invert blah.bw holdout.bw
    mult dropshadow.sc holdout.bw ds_holdout.sc
    #
    add white_over_clear.sc ds_holdout.sc white_over_ds_over_clear.sc
    iset SCREEN white_over_ds_over_clear.sc

 --------------------------------------------------------------------------
|   Sample images.                                                        |
 --------------------------------------------------------------------------

Some sample image files are included in the opaste/images directory.
They are categorized as follows:

        .ci files are SGI haeberli format colorindex image files.

        .map files are SGI haeberli format colormap files (used by
         savemap, loadmap, and mapimg commands).

        .msk is my own notation for SGI haeberli format grayscale
         images (normally tagged .bw) which contain mask (alpha
         channel) information.


December 1992
Tim Heidmann, Silicon Graphics


Files of interest from "src/apps/opaste" directory

Source

Documentation

Reference

Subdirectories


Select any combo of files you'd like to send yourself a compressed tar image of. Executables/scripts are indicated with a trailing `*' character. (Depending upon the browser, it may be necessary to hold down the Ctrl key to select/deselect disjoint items.) a compressed tar image of the above-selected items.
OR, ...
a compressed tar image of the entire opaste directory.

Copyright © 1995, Silicon Graphics, Inc.